﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Tìm hiểu ngôn ngữ ObjectiveC</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><B><FONT 
color=#000000>Đặc điểm cơ bản.</FONT></B></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Là ngôn ngữ hướng đối tượng</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Mở rộng từ C</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Nhẹ nhàng (không VM - không quá thực tạp với friend virtuals với 
template với ....)</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Mềm dẻo (mở rộng từ C nên bạn có thể dùng C thuần cấu trúc ngoài 
ra đây là ngôn ngữ run-time)</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Reflection (có hỗ chợ)</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- nil thay thế cho NULL trong C, bởi vì bạn có thể gửi thông điệp 
cho nil, nhưng không thể làm như vậy với NULL.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- BOOL có 2 giá trị là YES và NO chứ không phải là true và false 
nữa.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>              
                
                 
         - <FONT 
color=#800080>Khái niệm methods và message đc sử dụng mang ý nghĩa như nhau đối 
với ObC theo đó message có những thuộc tính đặc biệt.</FONT>              
                
                 
                  
                
</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#800080>              
                
                 
                  
     Mọto message có thể chuyền động từ obj tới một obj 
khác.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#800080>              
                
        Việc gọi thông điệp trên một obj không có 
nghĩa là obj đó sẽ thực hiện message nó có thể chuyển tiếp tới một obj khác chưa 
biết trước tóm lại có khả năng đáp trả thông điệp không trực tiệp thì gián 
tiếp.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Khi làm việc với Objective C bạn cần chú ý là bởi vì nó dc base 
trên nền của C cho nên việc bạn sử dụng cú pháp C chộn lẫn với cú pháp chính 
thống của Objective C là hoàn toàn chấp nhận, tuy nhìn có vẻ hơi củ 
chuối.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><B><FONT 
color=#000000>Phương thưc.</FONT></B></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Cách khai báo phương thức trong Objective - C</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Không tham số :<SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"> </SPAN></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><PHẠM vi=""><FONT 
color=#000000>&lt;(kiểu trả về)&gt;<TÊN c="" ng=""></TÊN></PHẠM></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Có tham số:<SPAN class=Apple-tab-span style="WHITE-SPACE: pre"> 
</SPAN></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><PHẠM vi=""><FONT 
color=#000000>&lt;(kiểu trả về)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><TÊN c="" ng="">:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM><NHÃN>:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM>;</THAM></NHÃN></THAM></TÊN></PHẠM></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Lời gọi phương thức:</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>không trả về:<SPAN class=Apple-converted-space>&nbsp;</SPAN><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"> </SPAN>[&lt;đối tượng&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><TÊN c="" ng="">];</TÊN></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT 
color=#000000>[&lt;đối tượng&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><TÊN c="" ng="">:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM>];</THAM></TÊN></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT 
color=#000000>[&lt;đối tượng&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><TÊN c="" ng="">:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM><NHÃN>:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM>];</THAM></NHÃN></THAM></TÊN></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Trả về kết quả:<SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"> </SPAN><KẾT><SPAN 
class=Apple-converted-space>&nbsp;</SPAN>= [&lt;đối tượng&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><TÊN c="" 
ng="">];</TÊN></KẾT></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><KẾT><FONT 
color=#000000><SPAN class=Apple-converted-space>&nbsp;</SPAN>= [&lt;đối 
tượng&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><TÊN c="" 
ng="">:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM><NHÃN>:&lt;(kiểu)&gt;<SPAN 
class=Apple-converted-space>&nbsp;</SPAN><THAM>];</THAM></NHÃN></THAM></TÊN></KẾT></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><B><FONT 
color=#000000>Lớp và đối tượng.</FONT></B></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>Ob-C sử dụng khái niệm Interface và Implementation để phân biêt 
file Header và file Source của C (*.h và *.c) một lớp trong ObC định nghĩa là 
trên một giao diện (.h) còn phần thực thi trên file .m các bạn chú ý là m vì nó 
khác với C và C++.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>@interface:</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>#import @interface Fraction: NSObject {</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT color=#000000>int 
numerator;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>@private</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT color=#000000>int 
denominator;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>}</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(void) print;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(void) setNumerator: (int) n;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(void) setDenominator: (int) d;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(int) numerator;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(int) denominator;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>@end</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>và đây là phần thực thi.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>@implementation</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>#import "Fraction.h"</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>@implementation Fraction</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(void) print {</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT color=#000000>printf( 
"%i/%i", numerator, denominator );</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>}</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(void) setNumerator: (int) n {</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT 
color=#000000>numerator =         n;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>}</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(void) setDenominator: (int) d {</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT 
color=#000000>denominator =    d;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>}</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(int) denominator {</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT color=#000000>return 
denominator;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>}</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>-(int) numerator {</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT color=#000000>return 
numerator;</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>}</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>@end</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000><BR></FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#0000ff>- Sử dụng #import để thay thế cho #include (đây là cơ chế thông 
minh hơn #include của C/C++ bạn chỉ phải thêm 1 lần thôi )</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#0000ff>- ObC chỉ cho phép đơn kế thừa. Mặc định tất cả các lớp sẽ kế thừa 
từ NSObject.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#0000ff>- Cặp @.... và @end là cặp giới hạn phạm vi một lớp.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Các thuộc tính dc khái báo trong cặp { ..... } và khai báo 
phương thức ở bên ngoài.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#000000>- Nếu phương thức bắt đâu bằng "+" có nghĩa nó là thuộc phạm vi 
lớp (static), còn nếu "-" thì nó ở phạm vi object.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#0000ff>- Các phạm vi truy xuất public,protected và private giống như C++ 
mặc định là protected.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#800000>- Các truy nhập phần tử cũng sử dụng toán tử "." đối với object và 
"-&gt;" nếu là con trỏ.</FONT></DIV>
<DIV 
style="WORD-SPACING: 0px; FONT: 13px/19px Verdana, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(204,204,204); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(158,181,204); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><FONT 
color=#ff0000>- không có các tầm vực truy xuất đối với phương thức (tức là trong 
ObC các phương thức có cùng một tầm vực là public)</FONT></DIV></body>
</html>
